package cn.qayy.po;

import java.io.Serializable;
import java.util.Date;

import cn.qayy.dto.BasisDTO;
import cn.qayy.utils.DateUtils;
/**
 * @author wcyong
 * 基础库实体
 * @date 2018-05-22
 */
@SuppressWarnings("serial")
public class Basis implements Serializable{
    private Integer id;

    /** 
     * 经理
     */
    private String mgr="";

    /**
     * 大区
     */
    private String daqu="";

    /**
     * 片区
     */
    private String space="";

    /**
     * 省份
     */
    private String province="";

    /**
     * 地市
     */
    private String city="";

    /**
     * 区县
     */
    private String country="";

    /**
     * 分组标识
     */
    private String product="";

    /**
     * 录入日期
     */
    private String today=DateUtils.dateToString(new Date(),"yyyy/MM/dd HH:mm:ss");

    /**
     * 录入人员
     */
    private String dataer="";
    
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getMgr() {
        return mgr;
    }

    public void setMgr(String mgr) {
        this.mgr = mgr == null ? null : mgr.trim();
    }

    public String getDaqu() {
        return daqu;
    }

    public void setDaqu(String daqu) {
        this.daqu = daqu == null ? null : daqu.trim();
    }

    public String getSpace() {
        return space;
    }

    public void setSpace(String space) {
        this.space = space == null ? null : space.trim();
    }

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province == null ? null : province.trim();
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city == null ? null : city.trim();
    }

    public String getCountry() {
        return country;
    }

    public void setCountry(String country) {
        this.country = country == null ? null : country.trim();
    }

    public String getProduct() {
        return product;
    }

    public void setProduct(String product) {
        this.product = product == null ? null : product.trim();
    }

    public String getToday() {
        return today;
    }

    public void setToday(String today) {
        this.today = today == null ? null : today.trim();
    }

    public String getDataer() {
        return dataer;
    }

    public void setDataer(String dataer) {
        this.dataer = dataer == null ? null : dataer.trim();
    }

	public Basis() {
		super();
	}

	public Basis(Integer id, String mgr, String daqu, String space, String province, String city, String country,
			String product, String today, String dataer) {
		super();
		this.id = id;
		this.mgr = mgr;
		this.daqu = daqu;
		this.space = space;
		this.province = province;
		this.city = city;
		this.country = country;
		this.product = product;
		this.today = today;
		this.dataer = dataer;
	}
	/**
	 * 通过DTO初始化
	 * @param dto
	 * @return
	 */
	public Basis setByDTO(BasisDTO dto) {
		this.setMgr(dto.getMgr());
		this.setDaqu(dto.getDaqu());
		this.setSpace(dto.getSpace());
		this.setProvince(dto.getProvince());
		this.setCity(dto.getCity());
		this.setCountry(dto.getCountry());
		this.setProduct(dto.getProduct());
		return this;
	}

	@Override
	public String toString() {
		return "Basis [id=" + id + ", mgr=" + mgr + ", daqu=" + daqu + ", space=" + space + ", province=" + province
				+ ", city=" + city + ", country=" + country + ", product=" + product + ", today=" + today + ", dataer="
				+ dataer + "]";
	}
}